package com.darrenchan.spark

import com.alibaba.fastjson.JSON

import scala.collection.mutable.ListBuffer

/**
  * @Desc
  * @Author chenchi03
  * @CreateTime 2020-03-20 19:06
  */
object TestDemo2 {
    def main(args: Array[String]): Unit = {
        //        val json = JSON.parseObject("{}")
        //        println(json == null)

        val list = ListBuffer[Int](1, 2, 3)
        val conditions = List("news", "gallery", "video", "dt")
        for (i <- conditions.indices) {
            var condition = conditions(i)
            list.map(r => {
                if (condition == "dt") {
                    condition = "event"
                }
                print(condition + ",")
            })
            println(condition)
        }
    }
}
